% if req.session and (req.session.notice or req.session.warning or req.session.error):
<div id="messages">
	% if req.session.notice:
	<div class="notice">${req.session.pop('notice')}</div>
	% endif
	% if req.session.warning:
	<div class="warning">${req.session.pop('warning')}</div>
	% endif
	% if req.session.error:
	<div class="error">${req.session.pop('error')}</div>
	% endif
</div>
% endif